package com.czapl.towers;

import com.badlogic.gdx.math.Vector2;
import com.czapl.api.IProjectile;
import com.czapl.api.IUnit;
import com.czapl.drawing.AnimatedSprite;
import com.czapl.drawing.CTower;
import com.czapl.mygdxgame.MyGdxGame;

public class FireTower extends CTower {

	public FireTower() {
		super();
		m_range = 200;
		m_fireRate = 100;
		m_rotationSpeed = 10;
		m_animatedSprite = new AnimatedSprite(MyGdxGame.towerAtlas, "tower1", 2);
	}
	
	public FireTower(FireTower fireTower) {
		super(fireTower);
	}

	@Override
	public CTower clone() {
		return new FireTower(this);
	}

	@Override
	protected void launchProjectile(IUnit unit) {
		IProjectile projectile = new CannonballProjectile(new Vector2(getX(), getY()));
		projectile.launch(unit);
		
	}

}
